<template>
    <view class="content columnbox wdh-100">
        <view class="color-box wdh-100"></view>
        <view class="btn-box rowbox spb ">
            <view class="columnbox one-btn" @click="addInfo">
                <image src="/static/img/yjfk.svg" mode="widthFix"></image>
                意见反馈
            </view>
            <view class="columnbox one-btn" @click="showRecord">
                <image src="/static/img/fkjd.svg" mode="widthFix"></image>
                反馈进度
            </view>
        </view>
		<!-- 热门问题 -->
		<view class="comonquestin display  width_750 displayColumn">
			<view class="comonquestin_one display width_750 M-L30 fontSize font_comm M-T30">
				<span class="font_txt1">热门问题</span>
			</view>
			<view class="fn_two display  all_item width_750 M-T30">
				<view class="fn_two_all display width_699  displayColumn displaycenter_jus">
					<u-collapse
						:border="false"
					    
					  >
					  <block v-for="(item,index) in hotList" :key="index">
					    <u-collapse-item
						
					      :title="item.title"
					      name="Docs guide"
					    >
					      <u-parse :content="item.content"></u-parse>
					    </u-collapse-item>
					   </block>
					  </u-collapse>
				</view>
			</view>
			
		</view>
		<!-- 常见问题 -->
		<view class="comonquestin display  width_750 displayColumn">
			<view class="comonquestin_one display width_750 M-L30 fontSize font_comm M-T30">
				<span class="font_txt1">常见问题</span>
			</view>
			<view class="fn_two display  all_item width_750 M-T30">
				<view class="fn_two_all display width_699  displayColumn">
					<u-collapse
						:border="false"
					    style="margin-top: 30rpx;"
					  >
					  <block v-for="(item,index) in commonList" :key="index">
					    <u-collapse-item
						
					      :title="item.title"
					      name="Docs guide"
					    >
					      <u-parse :content="item.content"></u-parse>
					    </u-collapse-item>
					   </block>
					  </u-collapse>
				</view>
			</view>
			
		</view>
		
		
    </view>
</template>

<script>
    export default {
        data() {
            return {
			hotList:[],//热门
			commonList:[],//常见
            };
        },
		onLoad() {
			// 获取热门列表
			this.getRemenList()
			// 获取常见问题
			this.getCommonList()
		},
        methods: {
            addInfo() {
                uni.navigateTo({
                    url: '/packageA/feedback/add'
                })
            },
            showRecord() {
                uni.navigateTo({
                    url: '/packageA/feedback/record'
                })
            },
			getCommonList(){
				let data = {
					helpProblemType:1,//常见问题
					pageSize:10,//,分页大小
					pageNum:1,//integer,当前页数
					orderByColumn:'',//,string,排序列
					isAsc:'',//,string,排序的方向desc或者asc
				}
				this.$req.get('/xcx/helpProblem/list',data).then(res=>{
					
					this.commonList = res.data.rows;
				})
			},
			getRemenList(){
				let data = {
					helpProblemType:0,//热门问题
					pageSize:10,//,分页大小
					pageNum:1,//integer,当前页数
					orderByColumn:'',//,string,排序列
					isAsc:'',//,string,排序的方向desc或者asc
				}
				this.$req.get('/xcx/helpProblem/list',data).then(res=>{
					
					this.hotList = res.data.rows;
				})
			}
        }
    }
</script>

<style lang="scss" scoped>
    .content {}

    .color-box {
        background: #17698F;
        padding-bottom: 100rpx;
    }

    .btn-box {
        background: #fff;
        margin-top: -70rpx;
        width: 700rpx;
        padding: 40rpx 120rpx;
        border-radius: 10rpx;
        box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
    }

    .one-btn {
        font-size: 28rpx;

        image {
            width: 50rpx;
            height: 50rpx;
            margin-bottom: 10rpx;
        }
    }
	.font_txt1{
		font-weight: 600;
		font-size: 32rpx;
		color: #000000;
	}
	.fn_two_all{
		// padding-bottom: 30rpx;
		width: 690rpx;
		background: #FFFFFF;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
	}
	.fn_two_all_item{
		justify-content: space-between;
	}
	.font_txt2{
		font-weight: 400;
		font-size: 28rpx;
		color: #000000;
	}
	.lines{
		width: 642rpx;
		height: 0rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		border: 2rpx solid #F6F6F6;
	}
</style>